<template>
    <header id="header">
        <span v-if="this.$route.path==='/mine'">我的</span>
        <span v-else-if="this.$route.path==='/cinema'">影院</span>
        <div v-else-if="this.$route.name==='detail'">
          <i class="iconfont icon-right" @click="goback"></i>
          影片详情
        </div>
        <span v-else-if="this.$route.path.includes('/movie')">电影</span>
        <span v-else>喵喵电影</span>
    </header>
</template>
<script>
export default {
   mounted:function(){
       
   },
    methods: {
      // 点击后退，从详情页出来
      goback(){
        this.$router.go(-1)
      },
    },
}
</script>
<style  scoped>
.iconfont{
  float: left;
}
header {
  background-color: #e54847;
  width: 100%;
  height: 3.125rem;
  color: white;
  line-height: 3.125rem;
  text-align: center;
  font-size: 1.125rem;
}

</style>
